package com.zrx.app.android;

import android.app.Application;
import android.content.Context;
import android.content.Intent;

import com.zrx.app.android.UTIL.ZRXUTIL;
import com.zrx.app.android.service.UploadService;

import java.io.File;

/**
 * Created by liuji on 2017/4/14.
 */

public class ZRXApplication extends Application {
    private static Context context;

    public void onCreate() {
        super.onCreate();
        ZRXApplication.context = getApplicationContext();
        new File(ZRXUTIL.getCachePath()).mkdirs();

        Intent i = new Intent(context, UploadService.class);
        startService(i);
    }

    public static Context getAppContext() {
        return ZRXApplication.context;
    }
}